{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
<link rel="stylesheet" type="text/css" href="__STATIC__/easyui/themes/custom/easyui.css" />    
<style type="text/css">
    .panel-header, .panel-body {
        border-color: #f2a654;
    }    
    .img_upload_wrp .img_upload_box{
        width:175px !important;
        height:375px !important;
    }
    .preview_photo{
        width:175px !important;
        height:375px !important;
    }
</style>  
<div class="box-content">
    <input type="hidden" id="id" name="id" />  
    <div id="js_main_header">
        <div class="control-group">
            <label class="control-label">
                海报标题</label>
            <div class="controls">
                <input  type="text" name="poster_name" id="title" class="form-control required" />                       
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                排列顺序</label>
            <div class="controls">
                <input type="text" data-dataType="positive_integer" id="order_index" name="order_index" value="{$order_index}" class="form-control required" />                                      
                <span class="tips">越小越靠前</span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                是否显示</label>
            <div class="controls" >
                <select name="is_show" id="" class="form-control">
                    <option value="1">显示</option>
                     <option value="0">不显示</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                海报图片
            </label>
            <div class="controls">
                <div id="js_upload_wrp">
                    <input type="hidden" id="pic" name="pic" value="" class="" />
                    {:hook('picResource',array('name'=>'pic','folder'=>'poster','tips'=>'建议尺寸：1:2。仅支持.jpg .png格式长方形照片。','callback'=>'uploadImgCallback'))}
                </div>
            </div>
        </div>
    </div>

</div>
{/block}

{block name="script"}
<script type="text/javascript">
/**
 * 添加图片
 */
function uploadImgCallback(path) {
    $("#pic").val(path);
}
function onLoadDataSuccess(data) {
    setPicValue("pic", data['pic']);
}

</script>
{/block}